<!DOCTYPE html>  
<html>
<head>  
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />  
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
	<title>Hello, World</title>  
	
	<style type="text/css">  
	html{height:100%}  
	body{height:100%;margin:0px;padding:0px}  
	#container{height:100%}  
	</style> 

	<!-- v2.0版本的引用方式：src="http://api.map.baidu.com/api?v=2.0&ak=您的密钥"  -->
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=4IU3oIAMpZhfWZsMu7xzqBBAf6vMHcoa">
	</script>
</head>  
<body>  
	<div id="container"></div> 
	<script type="text/javascript"> 
		//创建地图实例  
		var map = new BMap.Map("container");
		//创建点坐标  
		var point = new BMap.Point(116.404, 39.915);
		
		//添加地图类型控件
		map.addControl(new BMap.MapTypeControl({
			mapTypes:[
		        BMAP_NORMAL_MAP,
		        BMAP_HYBRID_MAP
		    ]}));	
		map.addControl(new BMap.ScaleControl({anchor: BMAP_ANCHOR_TOP_LEFT}));
		map.addControl(new BMap.NavigationControl());
		
		//初始化地图，设置中心点坐标和地图级别  
		map.centerAndZoom(point, 15);
		
		var stCtrl = new BMap.PanoramaControl(); //构造全景控件
		stCtrl.setOffset(new BMap.Size(20, 20));
		map.addControl(stCtrl);//添加全景控件
	</script>  
</body>  
</html>